package com.aiju.cash.ui.member.entity;

import com.aiju.utils.DateUtil;

import java.io.Serializable;

/**
 * @author: 佐为
 * @date: 2017-02-20 17:01
 * @version: V1.0
 * @Description: 会员卡
 */
public class MemberCard implements Serializable {

    private String id;          //会员卡id
    private String name;        //会员卡名称
    private String discount;    //会员折扣
    private String notice;      // 使用须知
    private String limitTime;   //会员期限 1:无期限
    private String startDate;   //有效期开始时间
    private String endDate;     //有效期结束时间
    private String status;      //会员卡状态 1:启用 2：禁用
    private String isPast;      //是否过期
    private String createDate;
    private String modifyDate;
    private String storeId;
    private String code;         //会员卡号
    private String type;        //会员卡类型 1：普通（目前就一种）
    private boolean select;
    private String num;         //已领人数
    private String memberPhone; //会员电话

    public String getMemberPhone() {
        return memberPhone;
    }
    public void setMemberPhone(String memberPhone) {
        this.memberPhone = memberPhone;
    }

    public boolean isSelect() {
        return select;
    }

    public void setSelect(boolean select) {
        this.select = select;
    }

    public String getTime() {
        return DateUtil.stringToString(getStartDate()) + " 至 " + DateUtil.stringToString(getEndDate());
    }

    public boolean isForever() {
        return limitTime.equals("1");
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIsPast() {
        return isPast;
    }

    public void setIsPast(String isPast) {
        this.isPast = isPast;
    }

    public String getLimitTime() {
        return limitTime;
    }

    public void setLimitTime(String limitTime) {
        this.limitTime = limitTime;
    }

    public String getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(String modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNotice() {
        return notice;
    }

    public void setNotice(String notice) {
        this.notice = notice;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getStatus() {
        return status;
    }

    public String getStatuText() {
        if (status.equals("1")) {
            return "生效";
        } else if (status.equals("2")) {
            return "失效";
        } else if (status.equals("3")) {
            return "尚未生效";
        } else if (status.equals("4")) {
            return "禁用";
        }
        return "未知";
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

}
